<?php

namespace common\models\datas;

use Yii;

/**
 * This is the model class for table "{{%tags}}".
 *
 * @property integer $id
 * @property string $title
 * @property string $type
 * @property integer $userid
 * @property integer $created_at
 */
class Tags extends \common\components\bases\BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%tags}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'userid', 'created_at', 'type'], 'integer'],
            [['title'], 'string', 'max' => 50]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('backend', 'ID'),
            'title' => Yii::t('backend', '标签名称'),
            'type' => Yii::t('backend', '标签类型'),
            'userid' => Yii::t('backend', '添加人'),
            'created_at' => Yii::t('backend', '创建时间'),
        ];
    }
}
